package mpcs.controller
{
	import mpcs.MainMediator;
	import mpcs.view.DesktopMediator;
	import mpcs.view.LoginMediator;
	
	import org.puremvc.as3.interfaces.INotification;
	import org.puremvc.as3.patterns.command.SimpleCommand;

	/**
	 *  
	 * @author zhangzuoqiang
	 */
	public class PrepViewCommand extends SimpleCommand
	{
		/**
		 * Prepare the View.
		 * 
		 * Get the View Components for the Mediators from the app,
		 * a reference to which was passed on the original startup 
		 * notification.
		 */
		override public function execute( note:INotification ) : void	{
			var app:MainApp = MainApp( note.getBody() );
			
			// 在此注册系统的Mediator ===============================================
			facade.registerMediator( new LoginMediator( app.loginForm ) );
//			facade.registerMediator( new DesktopMediator(app.mainPanel.desktopPanel) );
			
			
//			facade.registerMediator( new UserListMediator( app.userList ) );
//			facade.registerMediator( new RolePanelMediator( app.rolePanel ) );
		}
	}
}